package com.jiayang.hhotel.util;

import android.content.Context;
import android.widget.Toast;

/**
 * Created by Administrator on 2017/5/17 0017.
 */

public class ToastUtil {


    private static Toast toast;

    /**
     * 设置吐司
     */
    public static void Toast(String str, Context context){
        if(toast==null){
            toast=Toast.makeText(context,str,Toast.LENGTH_SHORT);
            toast.setText(str);
            toast.show();
        }else{
            toast.setText(str);
            toast.show();
        }
    }
}
